#pragma once

class Object
{
protected:
	bool c[XMAP][YMAP] = { 0 };
	Image * image;

	HDC memDC;
	Graphics * mg;

public:
	Object(HDC hdc, const std::wstring & picname);
	virtual ~Object();

	void draw(Graphics * graphics);
	void draw(HDC hdc);
	bool collide(Point pt);
	bool collide(Rect rc);
	void set(int x, int y, bool value);
	void update();
};

class Wall :public Object
{
public:
	Wall(HDC hdc, const std::wstring & picname);
	~Wall();

	void crash(std::initializer_list<std::pair<int, int>> list);
};

class Steel :public Object
{
public:
	Steel(HDC hdc, const std::wstring & picname);
	~Steel();
};

class Water :public Object
{
public:
	Water(HDC hdc, const std::wstring & picname);
	~Water();
};

class Grass :public Object
{
public:
	Grass(HDC hdc, const std::wstring & picname);
	~Grass();
};